﻿using System.IO;
using Styx;
using Styx.Helpers;
using System.ComponentModel;
using DefaultValue = Styx.Helpers.DefaultValueAttribute;
using Styx.Common;
using Styx.Common.Helpers;

namespace MyBMHunter
{
    public class CRSettingsBM : Settings
    {
        public static readonly CRSettingsBM myPrefs = new CRSettingsBM();

        public CRSettingsBM()
            : base(Path.Combine(Utilities.AssemblyDirectory, string.Format(@"Routines/Pasterke/Config/Hunter/{0}/BeastMasterSurvival-Settings-{1}.xml", StyxWoW.Me.RealmName, StyxWoW.Me.Name)))
        {
        }

        [Setting]
        [DefaultValue(Keypress.None)]
        [Category("Extra's")]
        [DisplayName("Pause CR Key")]
        [Description("Choose Key to pause the CR")]
        public Keypress PauseKeys { get; set; }

        [Setting]
        [DefaultValue(Keypress.None)]
        [Category("Extra's")]
        [DisplayName("Stop Aoe Key")]
        [Description("Choose Key to pause Aoe")]
        public Keypress AoePauseKeys { get; set; }

        public enum Keypress
        {
            None,
            LSHIFT,
            RSHIFT,
            LCTRL,
            RCTRL,
            LALT,
            RALT
        };

        [Setting]
        [DefaultValue(true)]
        [Category("Extra's")]
        [DisplayName("Raid Style Warnings")]
        [Description("If CR or Aoe is Paused, print raid style messages")]
        public bool PrintMsg { get; set; }

        [Setting]
        [DefaultValue(4)]
        [Category("Cooldowns")]
        [DisplayName("Elites Max Health")]
        [Description("If Elites Max Health bigger or equal than my Max Health")]
        public int ElitesHealth { get; set; }

        [Setting]
        [DefaultValue(55)]
        [Category("Protection")]
        [DisplayName("Healthstone %")]
        [Description("Use healthstone at specified health percent")]
        public int healtstonepercent { get; set; }

        [Setting]
        [DefaultValue(55)]
        [Category("Protection")]
        [DisplayName("Gift of the Naruu %")]
        [Description("Use Gift of the Naruu at specified health percent")]
        public int naruupercent { get; set; }

        [Setting]
        [DefaultValue(CooldownPrefs.Manual)]
        [Category("Cooldowns")]
        [DisplayName("Trinket 1")]
        [Description("When to use Trinket 1")]
        public CooldownPrefs trinket1 { get; set; }

        [Setting]
        [DefaultValue(CooldownPrefs.Manual)]
        [Category("Cooldowns")]
        [DisplayName("Trinket 2")]
        [Description("When to use Trinket 2")]
        public CooldownPrefs trinket2 { get; set; }

        [Setting]
        [DefaultValue(CooldownPrefs.Manual)]
        [Category("Cooldowns")]
        [DisplayName("Engineer Gloves")]
        [Description("When to use Engineer Gloves")]
        public CooldownPrefs gloves { get; set; }

        [Setting]
        [DefaultValue(CooldownPrefs.Manual)]
        [Category("Cooldowns")]
        [DisplayName("Lifeblood")]
        [Description("When to use Lifeblood if you have Herbalism")]
        public CooldownPrefs useLifeBlood { get; set; }

        [Setting]
        [DefaultValue(CooldownPrefs.Manual)]
        [Category("Cooldowns")]
        [DisplayName("Rapid Fire")]
        [Description("When to use Rapid Fire")]
        public CooldownPrefs useRapidFire { get; set; }

        [Setting]
        [DefaultValue(CooldownPrefs.Manual)]
        [Category("Cooldowns")]
        [DisplayName("Stampede")]
        [Description("When to use Stampede")]
        public CooldownPrefs useStampede { get; set; }

        [Setting]
        [DefaultValue(CooldownPrefs.Manual)]
        [Category("Cooldowns")]
        [DisplayName("A Murder of Crows")]
        [Description("When to use A Murder of Crows")]
        public CooldownPrefs useCrows { get; set; }

        public enum CooldownPrefs
        {
            Manual,
            OnCoolDown,
            Bosses
        };

        [Setting]
        [DefaultValue(false)]
        [Category("Movement")]
        [DisplayName("Movement")]
        [Description("Enable Movement Targeting  Facing")]
        public bool Movement { get; set; }

        [Setting]
        [DefaultValue(4)]
        [Category("Hunter Aoe")]
        [DisplayName("Aoe")]
        [Description("Number of adds to start Aoe")]
        public int startAoe { get; set; }

        [Setting]
        [DefaultValue(50)]
        [Category("Rest")]
        [DisplayName("Eat Food %")]
        [Description("Eat food when My Health % <= Value")]
        public int eatFood { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Hunter Aoe")]
        [DisplayName("Explosive Trap")]
        [Description("Use Explosive Trap or not")]
        public bool useExplosiveTrap { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Hunter")]
        [DisplayName("Interrupt")]
        [Description("Auto interrupt with Counter Shot")]
        public bool interrupt { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Hunter Aoe")]
        [DisplayName("Ice Trap")]
        [Description("Use Ice Trap or not")]
        public bool useIceTrap { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Hunter Aoe")]
        [DisplayName("Snake Trap")]
        [Description("Use Snake Trap or not")]
        public bool useSnakeTrap { get; set; }

        //Flasks & Potions

        

        public enum PotionsPrefs
        {
            Manual,
            RaidBosses,
            AllBosses
        }
        [Setting]
        [DefaultValue(PotionsPrefs.Manual)]
        [Category("Flasks & Potions")]
        [DisplayName("Virmen Potion")]
        [Description("When to use Virmen Potion")]
        public PotionsPrefs whenToUseStatsPotion { get; set; }

        public enum WhenToUseFlask
        {
            Manual,
            Raids,
            Raids_but_not_LFR,
            Instances
        }

        [Setting]
        [DefaultValue(WhenToUseFlask.Manual)]
        [Category("Flasks & Potions")]
        [DisplayName("Spring Blossom Flask")]
        [Description("When to use Flasks when enter in combat")]
        public WhenToUseFlask whenToUseFlask { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Flasks & Potions")]
        [DisplayName("Alchemy Flask")]
        [Description("Use Alchemy Flask or not")]
        public bool useAlchemyFlask { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Flasks & Potions")]
        [DisplayName("Crystal of Insanity")]
        [Description("Use Crystal of Insanity if no bigger buff exists")]
        public bool useCrystal { get; set; }

        //Hunter

        [Setting]
        [DefaultValue(65)]
        [Category("Focus")]
        [DisplayName("Arcane Shot Focus")]
        [Description("Use Arcane Shot if my Focus % >= Value")]
        public int focusPercentAS { get; set; }

        [Setting]
        [DefaultValue(45)]
        [Category("Focus")]
        [DisplayName("Cobra Shot")]
        [Description("Use Cobra Shot if my Focus % <= Value")]
        public int focusPercentCS { get; set; }

        [Setting]
        [DefaultValue(45)]
        [Category("Focus")]
        [DisplayName("Steady Shot")]
        [Description("Use Steady Shot if my Focus % <= Value")]
        public int focusPercentSteady { get; set; }

        [Setting]
        [DefaultValue(CooldownPrefs.Manual)]
        [Category("Hunter")]
        [DisplayName("Blood Fury")]
        [Description("Use Orc Racial Blood Fury")]
        public CooldownPrefs useBloodFury { get; set; }

        [Setting]
        [DefaultValue(CooldownPrefs.Manual)]
        [Category("Hunter")]
        [DisplayName("Berserking")]
        [Description("Use Troll Racial Berserking")]
        public CooldownPrefs useBerserking { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Hunter")]
        [DisplayName("Trap Launcher")]
        [Description("Auto Buff Trap Launcher")]
        public bool autoTrapLauncher { get; set; }

        public enum WhenMisdirection
        {
            Never,
            OnAggro
        }
        [Setting]
        [DefaultValue(WhenMisdirection.Never)]
        [Category("Hunter")]
        [DisplayName("Misdirection")]
        [Description("Use of Misdirection")]
        public WhenMisdirection useMisdirection { get; set; }

        [Setting]
        [DefaultValue(90)]
        [Category("Hunter")]
        [DisplayName("Misdirection ThreatInfo")]
        [Description("Use Misdirection if my ThreatInfo % >= Value")]
        public int misdirectionThreatInfo { get; set; }

        [Setting]
        [DefaultValue(75)]
        [Category("Pet Stuff")]
        [DisplayName("Mend Pet")]
        [Description("Use Mend Pet if my Pet's Healt % <= Value")]
        public int mendpetPercent { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Hunter")]
        [DisplayName("Kiting with Ice Trap")]
        [Description("Use Ice Trap when kiting")]
        public bool useIceTrapKiting { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Hunter")]
        [DisplayName("Kiting with Concussive Shot")]
        [Description("Use Concussive Shot when kiting")]
        public bool useConcussiveKiting { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Pet Stuff")]
        [DisplayName("Auto Call/Revive Pet")]
        [Description("Auto Call/Revive Pet or not")]
        public bool autoCallPet { get; set; }

        [Setting]
        [DefaultValue(1)]
        [Category("Pet Stuff")]
        [DisplayName("Call Pet Number")]
        [Description("Number of the pet to call")]
        public int CallPetNr { get; set; }
    }
}
